indexModule.controller('noticeContent',function($scope,$http,$routeParams){
    //网站id
    $scope.id = $routeParams.id;

    //获取内容和上下篇
    if($scope.id){
        var postData = {id:$scope.id};
        postHttp($http,config.noticeContent_httpUrl,postData,function(data){
            $scope.title = data.data.current.title;
            $scope.content = data.data.current.content;
            if(data.data.pre){
                $scope.preUrl = "#/notice/list/content/" + data.data.pre._id;
                $scope.preTitle = "【"+data.data.pre.title+"】";
            }else{
                $scope.preUrl = "javascript:;";
                $scope.preTitle = "无";
            }
            if(data.data.next){
                $scope.nextUrl = "#/notice/list/content/" + data.data.next._id;
                $scope.nextTitle = "【"+data.data.next.title+"】";
            }else{
                $scope.nextUrl = "javascript:;";
                $scope.nextTitle = "无";
            }
        });
    };
});

